package hypermediaresearch.controller.hypermedia.admin;

import hypermediaresearch.service.ProjectService;
/*
 * VinhJune 2012
 */
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.util.RequestMap;

public class AddProjectController extends Controller {

    private ProjectService service = new ProjectService();
    @Override
    public Navigation run() throws Exception {
        String coordinator = requestScope("coordinator");
        String partner1 = requestScope("partner1");
        String partner2 = requestScope("partner2");
        String partner3 = requestScope("partner3");
        String partner4 = requestScope("partner4");
        service.addProject(new RequestMap(request), coordinator, partner1, partner2, partner3, partner4);
        return redirect("/hypermedia/admin/projectadder");
    }
}
